package com.hivekion.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hivekion.system.domain.SysUserRoles;
import com.hivekion.system.mapper.SysUserRolesMapper;
import com.hivekion.system.service.ISysUserRolesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/*
 */
@Service
public class ISysUserRolesServiceImpl implements ISysUserRolesService {
      @Autowired
      private SysUserRolesMapper sysUserRolesMapper;

      @Override
      public SysUserRoles queryRoleByUserId(String userId) {
	    LambdaQueryWrapper<SysUserRoles> queryWrapper = Wrappers.lambdaQuery();
	    queryWrapper.eq(SysUserRoles::getUserId, userId);
	    return sysUserRolesMapper.selectOne(queryWrapper);
      }
}
